package com.terry.proxy.application.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.terry.proxy.application.entity.ProxyClientTunnel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 客户端隧道(ProxyClientTunnel)表数据库访问层
 *
 * @author terry
 * @since 2022-12-08 20:54:22
 */
@Mapper
public interface ProxyClientTunnelDao extends BaseMapper<ProxyClientTunnel> {

    @Select("SELECT IFNULL(MAX(SERVER_PORT)+1, 17783) FROM PROXY_CLIENT_TUNNEL")
    int getMaxPort();

}

